#ifndef CONTROLS_H_
#define CONTROLS_H_

#include <pspsdk.h>
#include <pspkernel.h>
#include <pspctrl.h>
#include <psphprm.h>

#ifdef __cplusplus
extern "C" {
#endif

typedef struct NSceCtrlData
{
	SceCtrlData data;
	unsigned int pressed;
	unsigned int released;
	unsigned int held;
	unsigned int last_held;
} NewCtrlData;

NewCtrlData read_controls();
SceCtrlData get_controls_sce();
int read_controls_sce(SceCtrlData *pad_data, int count);

int headphone_exist();
int remote_exist();
int microphone_exist();

typedef struct NHprmData
{
	u32 keydata;
	u32 pressed;
	u32 released;
	u32 held;
	u32 last_held;
} NewHprmData;

NewHprmData read_hprm();
u32 read_hprm_sce();

#ifdef __cplusplus
}
#endif

#endif /*CONTROLS_H_*/
